Add basic FormSteps flow for IdV React implementation#6195
Conversation
|
Initial commits up being fewer changes than I anticipated, maybe I shall go ahead and build out more here! |
There was a problem hiding this comment.
the reason we can remove this here is because we switched to globalThis._locale_data right?
There was a problem hiding this comment.
the reason we can remove this here is because we switched to
globalThis._locale_dataright?
Yeah, indirectly that's what the previous logic here was doing anyways, since the default i18n instance from @18f/identity-i18n is also initialized with globalThis._locale_data.
Now that I'm thinking about it, I wonder if there's a better way for the React context to reference that default i18n, rather than creating a new instance 🤔
There was a problem hiding this comment.
Now that I'm thinking about it, I wonder if there's a better way for the React context to reference that default
i18n, rather than creating a new instance 🤔
Updated in 0997d97. The value of an I18nContext is pretty low at this point since we have the shared instance to use now. Technically it could allow to use different locale data specific contexts, though I can't imagine we'd ever want to do that.
Might consider a future refactor:
import { t } from '@18f/identity-i18n';
import { formatHTML } from '@18f/identity-react-i18n';Or maybe even merge the packages.
import { t, formatHTML } from '@18f/identity-i18n';There was a problem hiding this comment.
Technically it could allow to use different locale data specific contexts, though I can't imagine we'd ever want to do that.
I guess there's one use-case after all 😅 77952d5b6
fc7fb1b to
446e4b5
Compare
77952d5 to
57a439d
Compare
For reuse in verify-flow
**Why**: So that we can start implementing step screens for the new, React-based identity verification flow. changelog: Upcoming Features, Identity Verification, Add personal key step screen
Moving toward potential future removal of useI18n
Previously receives strings object, now receives I18n instance
Changed in #6196
Bit easier to read with className last
34276b8 to
85de52f
Compare
Why: So that we can start implementing step screens for the new, React-based identity verification flow.
Screenshot:
(Note that this is currently only implementing simple content, not intending to be a complete implementation)